<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增预约订单')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-serviceorder-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">理发师ID：</label>
                <div class="col-sm-8">
                    <input name="registerId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">服务ID：</label>
                <div class="col-sm-8">
                    <input name="serviceId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">理发师姓名：</label>
                <div class="col-sm-8">
                    <input name="registerName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">服务名称：</label>
                <div class="col-sm-8">
                    <input name="serverName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">服务类型：</label>
                <div class="col-sm-8">
                    <select name="typeInfo" class="form-control m-b" th:with="type=${@dict.getType('service_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">价格：</label>
                <div class="col-sm-8">
                    <input name="price" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">支付状态：</label>
                <div class="col-sm-8">
                    <select name="payStatus" class="form-control m-b" th:with="type=${@dict.getType('pay_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">预约日期：</label>
                <div class="col-sm-8">
                    <input name="orderDate" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">预约时间：</label>
                <div class="col-sm-8">
                    <input name="orderTime" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "register/serviceorder"
        $("#form-serviceorder-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-serviceorder-add').serialize());
            }
        }
    </script>
</body>
</html>
